package com.lk.base.constant;

public class Constant {

	public static final String YES = "1";
	public static final String NO = "0";
	public static final String SOCKET_ENABLE_IP_INTERCEPT = "SOCKET_ENABLE_IP_INTERCEPT";
	public static final  String POINT="POINT_";

	public static final String SOCKET_WHITE_IP = "SOCKET_WHITE_IP";
	public static final String SOCKET_BLACK_IP = "SOCKET_BLACK_IP";
	public static final String SOCKET_WHITE_LIST = "SOCKET_WHITE_LIST";
	public static final String SOCKET_BLACK_LIST = "SOCKET_BLACK_LIST";

	public static final String SOCKET_WHITE_LIST_ENABLED = "SOCKET_ENABLE_WHITE_LIST_INTERCEPT";
	public static final Boolean SOCKET_BLACK_LIST_ENABLED = false;

	public enum ProtocolType{
		PRESSURE("01", "pressure"),
		GAS("04", "gas"),
		I3("02", "i3"),
		I4("03","i4"),
		I5("05","i5"),
		GATESTATION("06","gateStation"),
		VOLTAGEREGULATION("07","voltageRegulation");
		private String key;
	    private String label;
		private ProtocolType(String key,String label) {
			this.key = key;
			this.label = label;
		}
		public String getKey() {
			return key;
		}
		public void setKey(String key) {
			this.key = key;
		}
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
		public static String getLabel(String key) {
	        for (ProtocolType m : ProtocolType.values()) {
	            if (m.getKey().equals(key)) {
	                return m.getLabel();
	            }
	        }
	        return null;
	    }
	}
}
